package cc.mcggdd.leah.boot.stock.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cc.mcggdd.leah.boot.stock.model.entity.StockBill;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import cc.mcggdd.leah.boot.stock.model.query.StockBillQuery;
import cc.mcggdd.leah.boot.stock.model.vo.StockBillVO;
import org.apache.ibatis.annotations.Mapper;

import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * 账单Mapper接口
 *
 * @author 
 * @since 2025-02-10 14:57
 */
@Mapper
public interface StockBillMapper extends BaseMapper<StockBill> {

    /**
     * 获取账单分页数据
     *
     * @param page 分页对象
     * @param queryParams 查询参数
     * @return
     */
    Page<StockBillVO> getStockBillPage(Page<StockBillVO> page, StockBillQuery queryParams);

    BigDecimal getStockTotalAmount(Long debtId, String status);

    LocalDate getRepayMaxDate(String status);
}
